package com.sg.service.biz.app.nb;

import cn.hutool.core.bean.BeanUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.dto.biz.app.common.DataFilterSpecRecBy;
import com.sg.dto.biz.app.req.*;
import com.sg.dto.biz.app.res.*;
import com.sg.dto.integration.component.QuerySemanticEngineDetailReqDto;
import com.sg.dto.integration.component.QuerySemanticEngineDetailRespDto;
import com.wicket.okrapp.common.baseinfo.BaseInfoDO;
import com.wicket.okrapp.common.baseinfo.BaseInfoHolder;
import com.wicket.okrcomponent.integration.TemplateEngineService;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ： 手工接入方法
 * @version 1.0
 * @since 2022/5/28 15:32
 */
@Service
public class NbTaskGen {


    @Resource
    private TemplateEngineService fwCompTemplateEngineClient;

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（用于生成汇报任务逾期调度名称）
     * desc:undefined
     * gen by moon at 8/28/2022, 4:06:47 PM
     **/
    @Trace(operationName = "M3-生成语义内容（用于生成汇报任务逾期调度名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public GenerateSemanticContentRespDto generateSemanticContent(GenerateSemanticContentReqDto reqDto) {
        boolean bRetFlag = false;
        GenerateSemanticContentRespDto retData = new GenerateSemanticContentRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_UPDATE_EX_CYCLE_STAGE_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContName = "\\{targetContName}";
            String systemDateTime = "\\{systemDateTime}";
            String sixRandomNum = "\\{sixRandomNum}";
            if (reqDto.getTargetContentName() != null && !reqDto.getTargetContentName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContName, reqDto.getTargetContentName());
                retConent = retConent.replaceAll(systemDateTime, CommonFunctionHelper.date2Str(CommonFunctionHelper.getCurrentTime()));
                retConent = retConent.replaceAll(sixRandomNum, String.valueOf((Math.random() * 9 + 1) * 100000));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:publicFieldCache
     * name:M3更新公共字段缓存
     * desc:undefined
     * gen by moon at 8/28/2022, 4:08:18 PM
     **/
    @Trace(operationName = "M3更新公共字段缓存")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public RefreshPublicFieldCacheRespDto refreshPublicFieldCache(RefreshPublicFieldCacheReqDto reqDto) {
        if (BaseInfoHolder.contextHolder.get() != null) {
            BaseInfoHolder.contextHolder.remove();
        }
        BaseInfoDO domain = new BaseInfoDO();
        domain.setSpecSpaceId(reqDto.getSpaceId());
        domain.setSpecInductionRecordId(reqDto.getCreateInductionId());
        domain.setSpecAppId(reqDto.getAppId());
        CommonFunctionHelper.setBaseInfoToLocal(domain);
        return new RefreshPublicFieldCacheRespDto();
    }

    /**
     * code:publicFieldCache
     * name:M3执行业务应用公共字段推送内存（特殊方法）
     * desc:undefined
     * gen by moon at 9/22/2022, 12:03:17 AM
     **/
    @Trace(operationName = "M3执行业务应用公共字段推送内存（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementBizPublicFieldPushMemoryRespDto implementBizPublicFieldPushMemory(ImplementBizPublicFieldPushMemoryReqDto reqDto) {
        BaseInfoDO domain = new BaseInfoDO();
        if (BaseInfoHolder.contextHolder.get() != null) {
            BeanUtil.copyProperties(BaseInfoHolder.contextHolder.get().getBaseInfo(), domain);
            BaseInfoHolder.contextHolder.remove();
        }
        if (reqDto.getSpaceId() != null) {
            domain.setSpecSpaceId(reqDto.getSpaceId());
        }

        if (reqDto.getCreateInductionId() != null) {
            domain.setSpecInductionRecordId(reqDto.getCreateInductionId());
        }

        if (reqDto.getAppId() != null) {
            domain.setSpecAppId(reqDto.getAppId());
        }

        if (reqDto.getHighestOrgID() != null) {
            domain.setSpecHighestOrgID(reqDto.getHighestOrgID());
        }

        if (reqDto.getUserId() != null) {
            domain.setSpecUserId(reqDto.getUserId());
        }

        if (reqDto.getOriginalRoleMemberId() != null) {
            domain.setSpecOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());
        }

        CommonFunctionHelper.setBaseInfoToLocal(domain);
        return new ImplementBizPublicFieldPushMemoryRespDto();
    }

    /**
     * code:collectionsAggregation
     * name:M3-生成定时任务入参数据集融合（特殊方法）
     * desc:undefined
     * gen by moon at 9/24/2022, 10:00:23 PM
     **/
    @Trace(operationName = "M3-生成定时任务入参数据集融合（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public AddTimeTaskCollectionsAggregationRespDto addTimeTaskCollectionsAggregation(AddTimeTaskCollectionsAggregationReqDto reqDto) {
        //这个空壳没有了
        return new AddTimeTaskCollectionsAggregationRespDto();
    }

    /**
     * code:receptionService
     * name:M3获取接收外部字段(特殊方法）
     * desc:undefined
     * gen by moon at 9/27/2022, 8:44:25 AM
     **/
    @Trace(operationName = "M3获取接收外部字段(特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ObtainReceiveOutFieldRespDto obtainReceiveOutField(ObtainReceiveOutFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ObtainReceiveOutFieldRespDto.class);
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成更新指标目标周期名称等任务名称
     * desc:undefined
     * gen by moon at 10/7/2022, 1:35:11 AM
     **/
    @Trace(operationName = "M3-生成更新指标目标周期名称等任务名称")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateUpdateTargetContCycleEtcNameRespDto createUpdateTargetContCycleEtcName(CreateUpdateTargetContCycleEtcNameReqDto reqDto) {
        //{targetContentName}：更新目标周期名称等任务
        boolean bRetFlag = false;
        CreateUpdateTargetContCycleEtcNameRespDto retData = new CreateUpdateTargetContCycleEtcNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_UPDATE_TARGET_CONT_CYCLE_ETC_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null && !reqDto.getTargetContentName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成部门目标任务书树当前叶子任务名称
     * desc:undefined
     * gen by moon at 10/7/2022, 1:35:17 AM
     **/
    @Trace(operationName = "M3-生成部门目标任务书树当前叶子任务名称")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateDeptTargetTreeLeafTaskNameRespDto createDeptTargetTreeLeafTaskName(CreateDeptTargetTreeLeafTaskNameReqDto reqDto) {
        //{objectiveShortName}：生成部门目标任务书树当前叶子任务
        boolean bRetFlag = false;
        CreateDeptTargetTreeLeafTaskNameRespDto retData = new CreateDeptTargetTreeLeafTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_DEPT_TARGET_TREE_LEAF_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String objectiveShortName = "\\{objectiveShortName}";
            if (reqDto.getObjectiveShortName() != null && !reqDto.getObjectiveShortName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(objectiveShortName, reqDto.getObjectiveShortName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(objectiveShortName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成目标内容祖先父子状态任务名称
     * desc:undefined
     * gen by moon at 10/7/2022, 1:35:23 AM
     **/
    @Trace(operationName = "M3-生成目标内容祖先父子状态任务名称")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateTargetContAnceParentStaTaskRespDto createTargetContAnceParentStaTask(CreateTargetContAnceParentStaTaskReqDto reqDto) {
        //{targetContentName}：设定执行祖先目标父子状态任务
        boolean bRetFlag = false;
        CreateTargetContAnceParentStaTaskRespDto retData = new CreateTargetContAnceParentStaTaskRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_TARGET_CONT_ANCE_PARENT_STA_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null && !reqDto.getTargetContentName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M-生成名称（部门目标任务书树当前叶子任务名称）
     * desc:undefined
     * gen by moon at 10/7/2022, 1:44:38 AM
     **/
    @Trace(operationName = "M-生成名称（部门目标任务书树当前叶子任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public AddNameRespDto addName(AddNameReqDto reqDto) {
        //{objectiveShortName}：生成部门目标任务书树当前叶子任务
        boolean bRetFlag = false;
        AddNameRespDto retData = new AddNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_DEPT_TARGET_TREE_LEAF_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String objectiveShortName = "\\{objectiveShortName}";
            if (reqDto.getObjectiveShortName() != null && !reqDto.getObjectiveShortName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(objectiveShortName, reqDto.getObjectiveShortName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(objectiveShortName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容
     * desc:undefined
     * gen by moon at 10/10/2022, 12:54:27 AM
     **/
    @Trace(operationName = "M3-生成语义内容")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateUpdateExCycleStageNameRespDto createUpdateExCycleStageName(CreateUpdateExCycleStageNameReqDto reqDto) {
        //{targetContName}：新增模板执行周期阶段任务
        CreateUpdateExCycleStageNameRespDto retData = new CreateUpdateExCycleStageNameRespDto();
        boolean bRetFlag = false;
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_UPDATE_EX_CYCLE_STAGE_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null && !reqDto.getTargetContentName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容
     * desc:undefined
     * gen by moon at 10/10/2022, 12:55:41 AM
     **/
    @Trace(operationName = "M3-生成语义内容")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateUpdateFourTreeEtcTaskNameRespDto createUpdateFourTreeEtcTaskName(CreateUpdateFourTreeEtcTaskNameReqDto reqDto) {
        //{targetContentName}：更新四棵树偏差天数等调度任务
        CreateUpdateFourTreeEtcTaskNameRespDto retData = new CreateUpdateFourTreeEtcTaskNameRespDto();
        boolean bRetFlag = false;
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_UPDATE_FOUR_TREE_ETC_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null && !reqDto.getTargetContentName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成删除评价模板克隆答案等任务名称
     * desc:undefined
     * gen by moon at 10/14/2022, 11:18:17 PM
     **/
    @Trace(operationName = "M3-生成删除评价模板克隆答案等任务名称")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public DelTempCloneResultEtcTaskNameRespDto delTempCloneResultEtcTaskName(DelTempCloneResultEtcTaskNameReqDto reqDto) {
        //删除{evaluationTempShortName}模板克隆答案等相关任务
        boolean bRetFlag = false;
        DelTempCloneResultEtcTaskNameRespDto retData = new DelTempCloneResultEtcTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_DEL_TEMP_CLONE_RESULT_ETC_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String evaluationTempShortName = "\\{evaluationTempShortName}";
            if (reqDto.getEvaluationTempShortName() != null && !reqDto.getEvaluationTempShortName().isEmpty()) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(evaluationTempShortName, reqDto.getEvaluationTempShortName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(evaluationTempShortName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（定时调度生成平台所有汇报任务名称）
     * desc:undefined
     * gen by moon at 10/26/2022, 12:08:42 AM
     **/
    @Trace(operationName = "M3-生成语义内容（定时调度生成平台所有汇报任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CyclePlanPlfReportDataNameRespDto cyclePlanPlfReportDataName(CyclePlanPlfReportDataNameReqDto reqDto) {
        //{systemDateTime}定时调度生成平台所有汇报任务名称
        boolean bRetFlag = false;
        CyclePlanPlfReportDataNameRespDto retData = new CyclePlanPlfReportDataNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_REPORT_DATA_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（更新任务逾期等数据任务名称）
     * desc:undefined
     * gen by moon at 10/26/2022, 12:08:44 AM
     **/
    @Trace(operationName = "M3-生成语义内容（更新任务逾期等数据任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateUpdateOverdueDataDispatchNameRespDto createUpdateOverdueDataDispatchName(CreateUpdateOverdueDataDispatchNameReqDto reqDto) {
        //{taskName}：更新逾期等数据调度任务
        boolean bRetFlag = false;
        CreateUpdateOverdueDataDispatchNameRespDto retData = new CreateUpdateOverdueDataDispatchNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_UPDATE_OVERDUE_DATA_DISPATCH_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String taskName = "\\{taskName}";
            if (reqDto.getTaskName() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(taskName, reqDto.getTaskName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(taskName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义名称（用于评价模板级当前周期阶段的调度生成）
     * desc:undefined
     * gen by moon at 10/26/2022, 12:08:46 AM
     **/
    @Trace(operationName = "M3-生成语义名称（用于评价模板级当前周期阶段的调度生成）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateTempCycleStageDispatchNameRespDto createTempCycleStageDispatchName(CreateTempCycleStageDispatchNameReqDto reqDto) {
        //{cyclelAlias}：生成评价模板调度汇报任务
        boolean bRetFlag = false;
        CreateTempCycleStageDispatchNameRespDto retData = new CreateTempCycleStageDispatchNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_TEMP_CYCLE_STAGE_DISPATCH_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String cyclelAlias = "\\{cyclelAlias}";
            if (reqDto.getCyclelAlias() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(cyclelAlias, reqDto.getCyclelAlias());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(cyclelAlias, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（删除目标内容基本信息任务名称）
     * desc:undefined
     * gen by moon at 10/26/2022, 12:08:47 AM
     **/
    @Trace(operationName = "M3-生成语义内容（删除目标内容基本信息任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateDeleteTargetContInfoTaskNameRespDto createDeleteTargetContInfoTaskName(CreateDeleteTargetContInfoTaskNameReqDto reqDto) {
        // {systemDateTime}：删除基本信息任务

        boolean bRetFlag = false;
        CreateDeleteTargetContInfoTaskNameRespDto retData = new CreateDeleteTargetContInfoTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_DELETE_TARGET_CONT_INFO_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成计算目标汇报数据调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:52:37 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成计算目标汇报数据调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateCalcTargetReportDataTaskNameRespDto createCalcTargetReportDataTaskName(CreateCalcTargetReportDataTaskNameReqDto reqDto) {
        //{taskName}计算目标汇报数据调度任务
        boolean bRetFlag = false;
        CreateCalcTargetReportDataTaskNameRespDto retData = new CreateCalcTargetReportDataTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_CALC_TARGET_REPORT_DATA_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String taskName = "\\{taskName}";
            if (reqDto.getTaskName() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(taskName, reqDto.getTaskName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(taskName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成OKR个人树调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:52:43 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成OKR个人树调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateOkrPersonalTreeDataNameRespDto createOkrPersonalTreeDataName(CreateOkrPersonalTreeDataNameReqDto reqDto) {
        //生成{targetContentName}OKR个人树调度任务
        boolean bRetFlag = false;
        CreateOkrPersonalTreeDataNameRespDto retData = new CreateOkrPersonalTreeDataNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_OKR_PERSONAL_TREE_DATA_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台补偿设定祖先目标父子状态调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:52:49 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台补偿设定祖先目标父子状态调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateDisatchTargetAncestorTaskNameRespDto createDisatchTargetAncestorTaskName(CreateDisatchTargetAncestorTaskNameReqDto reqDto) {
        //{systemDateTime}平台补偿设定祖先目标父子状态调度任务
        boolean bRetFlag = false;
        CreateDisatchTargetAncestorTaskNameRespDto retData = new CreateDisatchTargetAncestorTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_TARGET_CONT_ANCE_PARENT_STA_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台所有个人OKR树调度名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:52:56 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台所有个人OKR树调度名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreatePltOkrPersonalTreeDataNameRespDto createPltOkrPersonalTreeDataName(CreatePltOkrPersonalTreeDataNameReqDto reqDto) {
        //{systemDateTime}生成平台所有OKR个人树调度任务
        boolean bRetFlag = false;
        CreatePltOkrPersonalTreeDataNameRespDto retData = new CreatePltOkrPersonalTreeDataNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_OKR_PERSONAL_TREE_DATA_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台更新任务逾期等数据调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:53:02 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台更新任务逾期等数据调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreatePltUpdateOverdueDataDispatchNameRespDto createPltUpdateOverdueDataDispatchName(CreatePltUpdateOverdueDataDispatchNameReqDto reqDto) {
        //{systemDateTime}生成平台更新所有任务逾期等数据调度任务
        boolean bRetFlag = false;
        CreatePltUpdateOverdueDataDispatchNameRespDto retData = new CreatePltUpdateOverdueDataDispatchNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_UPDATE_OVERDUE_DATA_DISPATCH_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台更新四棵树偏差天数等数据调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:53:08 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台更新四棵树偏差天数等数据调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreatePltUpdateFourTreeEtcTaskNameRespDto createPltUpdateFourTreeEtcTaskName(CreatePltUpdateFourTreeEtcTaskNameReqDto reqDto) {
        //{systemDateTime}平台更新所有四棵树偏差天数等调度任务
        boolean bRetFlag = false;
        CreatePltUpdateFourTreeEtcTaskNameRespDto retData = new CreatePltUpdateFourTreeEtcTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_UPDATE_FOUR_TREE_ETC_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台更新执行周期阶段当前周期等调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:53:15 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台更新执行周期阶段当前周期等调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreatePltUpdateExCycleStageNameRespDto createPltUpdateExCycleStageName(CreatePltUpdateExCycleStageNameReqDto reqDto) {
        //{systemDateTime}生成平台更新所有执行周期阶段当前周期等调度任务
        boolean bRetFlag = false;
        CreatePltUpdateExCycleStageNameRespDto retData = new CreatePltUpdateExCycleStageNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_UPDATE_EX_CYCLE_STAGE_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台补偿计算目标汇报数据调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:53:21 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台补偿计算目标汇报数据调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreatePlatRescueCountTargetScoreTaskNameRespDto createPlatRescueCountTargetScoreTaskName(CreatePlatRescueCountTargetScoreTaskNameReqDto reqDto) {
        //{systemDateTime}平台补偿计算目标汇报数据调度任务
        boolean bRetFlag = false;
        CreatePlatRescueCountTargetScoreTaskNameRespDto retData = new CreatePlatRescueCountTargetScoreTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_CALC_TARGET_REPORT_DATA_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台补偿删除目标内容基本信息调度任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:53:28 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台补偿删除目标内容基本信息调度任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreatePltDeleteTargetContInfoTaskNameRespDto createPltDeleteTargetContInfoTaskName(CreatePltDeleteTargetContInfoTaskNameReqDto reqDto) {
        //{systemDateTime}平台补偿删除目标内容基本信息调度任务
        boolean bRetFlag = false;
        CreatePltDeleteTargetContInfoTaskNameRespDto retData = new CreatePltDeleteTargetContInfoTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_DELETE_TARGET_CONT_INFO_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成平台补偿删除模板克隆答案等任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:53:34 AM
     **/
    @Trace(operationName = "M3-生成语义内容（生成平台补偿删除模板克隆答案等任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public PlaDelTempCloneResultEtcTaskNameRespDto plaDelTempCloneResultEtcTaskName(PlaDelTempCloneResultEtcTaskNameReqDto reqDto) {
        //{systemDateTime}平台补偿删除模板克隆答案等任务
        boolean bRetFlag = false;
        PlaDelTempCloneResultEtcTaskNameRespDto retData = new PlaDelTempCloneResultEtcTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_PLT_DEL_TEMP_CLONE_RESULT_ETC_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String systemDateTime = "\\{systemDateTime}";
            if (reqDto.getSystemDateTime() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, CommonFunctionHelper.date2Str(reqDto.getSystemDateTime()));
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(systemDateTime, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（调度生成汇报任务名称）
     * desc:undefined
     * gen by moon at 10/27/2022, 3:26:45 PM
     **/
    @Trace(operationName = "M3-生成语义内容（调度生成汇报任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateReportDispatchNameRespDto createReportDispatchName(CreateReportDispatchNameReqDto reqDto) {
        //{cyclelAlias}：调度生成汇报任务
        boolean bRetFlag = false;
        CreateReportDispatchNameRespDto retData = new CreateReportDispatchNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_REPORT_DISPATCH_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String cyclelAlias = "\\{cyclelAlias}";
            if (reqDto.getCyclelAlias() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(cyclelAlias, reqDto.getCyclelAlias());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(cyclelAlias, "---");
                retConent = retConent.replaceAll(cyclelAlias, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:receptionService
     * name:M3约定值为1
     * desc:undefined
     * gen by moon at 11/1/2022, 7:30:21 AM
     **/
    @Trace(operationName = "M3约定值为1")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementBizConstructAccessParameterFieldRespDto implementBizConstructAccessParameterField(ImplementBizConstructAccessParameterFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementBizConstructAccessParameterFieldRespDto.class);
    }

    /**
     * code:minimumOfMultipleNum
     * name:M3计算数据集最小值记录（特殊方法）
     * desc:undefined
     * gen by moon at 11/1/2022, 10:13:12 PM
     **/
    @Trace(operationName = "M3计算数据集最小值记录（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CalculateDataMiniRecordRespDto calculateDataMiniRecord(CalculateDataMiniRecordReqDto reqDto) {
        // TODO ruizhe skai dong ; 11/1/2022, 10:13:12 PM
        return new CalculateDataMiniRecordRespDto();
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（调度生成空间长生守护MQ调度队列任务名称）
     * desc:undefined
     * gen by moon at 11/2/2022, 8:02:36 AM
     **/
    @Trace(operationName = "M3-生成语义内容（调度生成空间长生守护MQ调度队列任务名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateEverYoungGuardMqDispatchQueueTaskNameRespDto createEverYoungGuardMqDispatchQueueTaskName(CreateEverYoungGuardMqDispatchQueueTaskNameReqDto reqDto) {
        //{spaceName}长生守护MQ调度队列任务

        boolean bRetFlag = false;
        CreateEverYoungGuardMqDispatchQueueTaskNameRespDto retData = new CreateEverYoungGuardMqDispatchQueueTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_EVER_YOUNG_GUARD_MQ_DISPATCH_QUEUE_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String spaceName = "\\{spaceName}";
            if (reqDto.getSpaceName() != null && reqDto.getSpaceName() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(spaceName, reqDto.getSpaceName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(spaceName, "---");
                retConent = retConent.replaceAll(spaceName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:maxOrMinOfMultipleNum
     * name:M3计算数据集最大小值记录（特殊方法）
     * desc:undefined
     * gen by moon at 11/2/2022, 8:02:45 AM
     **/
    @Trace(operationName = "M3计算数据集最大小值记录（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CalculateDataBigMiniRecordRespDto calculateDataBigMiniRecord(CalculateDataBigMiniRecordReqDto reqDto) {
        CalculateDataBigMiniRecordRespDto retData = new CalculateDataBigMiniRecordRespDto();
        Long max = 0L;
        Long min = 9999999999L;
        String maxTaretPriId = "";
        String minTaretPriId = "";
        for (DataMiniRecordDto one : reqDto.getDataMiniRecordList()) {
            if (one.getOutputNum() >= max) {
                max = one.getOutputNum();
                maxTaretPriId = one.getContentID();
            }
            if (one.getOutputNum() <= min) {
                min = one.getOutputNum();
                minTaretPriId = one.getContentID();
            }
        }
        if (reqDto.getCalcMaxAndMin().equals("MAX")) {
            retData.setContentID(maxTaretPriId);
            retData.setOutputNum(max);
        } else {
            retData.setContentID(minTaretPriId);
            retData.setOutputNum(min);
        }

        return retData;
    }

    /**
     * code:receptionService
     * name:M3-获取接收字段（特殊方法）
     * desc:undefined
     * gen by moon at 12/1/2022, 12:52:00 AM
     **/
    @Trace(operationName = "M3-获取接收字段（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ObtainReceiveFieldRespDto obtainReceiveField(ObtainReceiveFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ObtainReceiveFieldRespDto.class);
    }

    /**
     * code:dataFilterSpecRecBy
     * name:M3-指标下所有定时任务调度排掉本次删除指标的定时任务调度
     * desc:undefined
     * gen by moon at 12/1/2022, 12:52:01 AM
     **/
    @Trace(operationName = "M3-指标下所有定时任务调度排掉本次删除指标的定时任务调度")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementDataFilterSpecRecByRespDto implementDataFilterSpecRecBy(ImplementDataFilterSpecRecByReqDto reqDto) {
        ImplementDataFilterSpecRecByRespDto retData = new ImplementDataFilterSpecRecByRespDto();
        for (DataFilterSpecRecBy one : reqDto.getDataFilterSpecRecByList()) {
            if (!one.getCommPrimaryKey().equals(reqDto.getCommPrimaryKey())) {
                retData.getDataFilterSpecRecByList().add(one);
            }
        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（调度自动更新权重分）
     * desc:undefined
     * gen by moon at 12/27/2022, 7:19:35 PM
     **/
    @Trace(operationName = "M3-生成语义内容（调度自动更新权重分）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CreateTimingTaskAutoUpdateWeightScoreNameRespDto createTimingTaskAutoUpdateWeightScoreName(CreateTimingTaskAutoUpdateWeightScoreNameReqDto reqDto) {
        //{targetContentName}：下级内容目标周期权重分更新调度
        boolean bRetFlag = false;
        CreateTimingTaskAutoUpdateWeightScoreNameRespDto retData = new CreateTimingTaskAutoUpdateWeightScoreNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("CREATE_TIMING_TASK_AUTO_UPDATE_WEIGHT_SCORE_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null && reqDto.getTargetContentName() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
                retConent = retConent.replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:generateSemanticInstance
     * name:M3-生成语义内容（生成构建三棵树当前叶子及上级目标调度名称）
     * desc:undefined
     * gen by moon at 1/1/2023, 11:38:40 PM
     **/
    @Trace(operationName = "M3-生成语义内容（生成构建三棵树当前叶子及上级目标调度名称）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public BuildThreeTreeCurrentLeafAndSuperiorTaskNameRespDto buildThreeTreeCurrentLeafAndSuperiorTaskName(BuildThreeTreeCurrentLeafAndSuperiorTaskNameReqDto reqDto) {
//{targetContentName}：构建三棵树当前叶子及上级目标调
        boolean bRetFlag = false;
        BuildThreeTreeCurrentLeafAndSuperiorTaskNameRespDto retData = new BuildThreeTreeCurrentLeafAndSuperiorTaskNameRespDto();
        String retConent = "";
        QuerySemanticEngineDetailReqDto querySemanticEngineDetailReqDto = new QuerySemanticEngineDetailReqDto();
        querySemanticEngineDetailReqDto.setTemplateSemanticEngineCode("BUILD_THREE_TREE_CURRENT_LEAF_AND_SUPERIOR_TASK_NAME");
        QuerySemanticEngineDetailRespDto querySemanticEngineDetailRespDto = fwCompTemplateEngineClient.querySemanticEngineDetail(querySemanticEngineDetailReqDto).getData();
        if (querySemanticEngineDetailRespDto != null && querySemanticEngineDetailRespDto.getTemplateEngineTemplate() != null) {
            String targetContentName = "\\{targetContentName}";
            if (reqDto.getTargetContentName() != null && reqDto.getTargetContentName() != null) {
                bRetFlag = true;
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, reqDto.getTargetContentName());
            } else {
                retConent = querySemanticEngineDetailRespDto.getTemplateEngineTemplate().replaceAll(targetContentName, "---");
                retConent = retConent.replaceAll(targetContentName, "---");
            }

            if (retConent != null && !retConent.isEmpty()) {
                retConent = retConent.replaceAll("---", "");
                retConent = retConent.replaceAll("（）", "");
                retData.setObjectName(retConent);
            }

            if (bRetFlag) {
                return retData;
            }

        }
        return retData;
    }

    /**
     * code:receptionService
     * name:M3执行获取出入参业务字段（特殊方法）
     * desc:undefined
     * gen by moon at 2/16/2023, 10:07:32 PM
     **/
    @Trace(operationName = "M3执行获取出入参业务字段（特殊方法）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementAccessParameterBizFieldRespDto implementAccessParameterBizField(ImplementAccessParameterBizFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementAccessParameterBizFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3接收上文出参定时任务调度记录ID
     * desc:undefined
     * gen by moon at 4/13/2023, 12:34:35 AM
     **/
    @Trace(operationName = "M3接收上文出参定时任务调度记录ID")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementAcceptFieldRespDto implementAcceptField(ImplementAcceptFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementAcceptFieldRespDto.class);
    }

    /**
     * code:receptionService
     * name:约定出参：定时任务调度记录ID
     * desc:undefined
     * gen by moon at 5/13/2023, 5:18:12 AM
     **/
    @Trace(operationName = "约定出参：定时任务调度记录ID")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public CalculateAcceptAboveFieldsRespDto calculateAcceptAboveFields(CalculateAcceptAboveFieldsReqDto reqDto) {
        return BeanUtil.toBean(reqDto, CalculateAcceptAboveFieldsRespDto.class);
    }

    /**
     * code:receptionService
     * name:M3约定为是
     * desc:undefined
     * gen by moon at 1/4/2024, 7:41:30 PM
     **/
    @Trace(operationName = "M3约定为是")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    public ImplementFourthReceivingFieldRespDto implementFourthReceivingField(ImplementFourthReceivingFieldReqDto reqDto) {
        return BeanUtil.toBean(reqDto, ImplementFourthReceivingFieldRespDto.class);
    }
    //手工接入方法
}
